package com.example.lpactivity.fragment.news;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.example.lpactivity.R;

public class NewsActivity extends AppCompatActivity {

    private NewsContentFragment newsContentFragment;
    private NewsTitleFragment newsTitleFragment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_news);
        initViews();
    }

    private void initViews() {
        newsTitleFragment = (NewsTitleFragment) getFragmentManager().findFragmentById(R.id.fm_title);
        newsContentFragment = (NewsContentFragment) getFragmentManager().findFragmentById(R.id.fm_content);
        newsTitleFragment.setLandView(newsContentFragment != null);
    }
}
